#ifndef __image__h__
#define __image__h__

#include "neiderra/core/Defs.h"
#include "neiderra/core/Types.h"

namespace neiderra
{
	namespace rendering
	{
		using neiderra::types::nByte;

		// 24-bit image, RGB 
		class Image
		{
		public:
			enum Format {	// not implemented yet
				rgb,
				rgba
			};

			Image();
			Image(const unsigned width, 
				unsigned height);
			Image(const unsigned width, 
				const unsigned height, nByte* data);
			Image(Image&);

			virtual ~Image();

			Image& operator=(const Image&);
			Image* copy(int x, int y, int width, int height);
			Image& paste(int x, int y, Image*);
			inline bool setPixel(unsigned x, unsigned y, nByte rgb[]);

			void setData(const unsigned width, 
				const unsigned height, const nByte* data);

			nByte* getData();
			unsigned getWidth();
			unsigned getHeight();

		private:
			unsigned width_, height_;
			nByte* data_;
			Format _format;
		};
	}
}

#endif
